import { Builder } from "./Builder";
import { ConcreteProduct } from "./ConcreteProduct";
import { Product } from "./Product";

export class ConcreteBuilder extends Builder {

    private product: Product = new ConcreteProduct();

    build(): Product {
        this.naming();
        return this.product;
    }
    naming(): void {
        // 即使建造意味着对应产品的构建过程应该被封装
        this.product.naming("领航员");
    }

}